Page({

  /**
   * 页面的初始数据
   */
  data: {
    businessData: [{
      name: "流水记录",
      url: "/pages/dataAnalysis/moneyRecord/moneyReord",
      icon: "icon10.png"
    }, {
      name: "定期存款记录",
      url: "/pages/dataAnalysis/fixSaveRecord/fixSaveRecord",
      icon: "icon7.png"
    }, {
      name: "业务办理记录",
      url: "/pages/dataAnalysis/businessRecord/businessRecord",
      icon: "icon1.png"
    },  {
      name: "借出记录",
      url: "/pages/dataAnalysis/lendRecord/lendRecord",
      icon: "icon13.png"
    },{
      name: "存款分析",
      url: "/pages/dataAnalysis/moneyAnalysis/moneyAnalysis",
      icon: "icon9.png"
    }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    wx.showShareMenu({
      withShareTicket: true,
      menus: ['shareAppMessage', 'shareTimeline']
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
    return {
      "title": `儿童微行`,
      "path": `pages/tabBar/summary/home`,
      "imageUrl": "/resoures/logo.png"
    }
  },
  onShareTimeline() {
    return {
      "title": `儿童微行`,
      "path": `pages/tabBar/summary/home`,
      "imageUrl": "/resoures/logo.png"
    }
  },
  onClickItem({ currentTarget: { id } }) {
    wx.navigateTo({
      url: this.data.businessData[id].url,
    })
  }
})